#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
import socket               
import random
import time
client = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 
client.connect(('192.168.3.53',1821))
   


while True:
    a1 = str(round(random.uniform(0.8,-0.8),3))
    a2 = str(round(random.uniform(0.8,-0.8),3))
    a3 = str(round(random.uniform(0.8,-0.8),3))

    a4 = str(round(random.uniform(1.5,-1.5),3))
    a5 = str(round(random.uniform(1.5,-1.5),3))
    a6 = str(round(random.uniform(1.5,-1.5),3))
    msg = 'R%s_%s_%s_%s_%s_%s'%(a1,a2,a3,a4,a5,a6)  
    print("msg: "+ msg)
    client.send(msg.encode('utf-8')) 
    #data = client.recv(1024) 
    #print('recv:',data.decode()) 
    time.sleep(5)
client.close() 



#print s.recv(1024)
